home *** CD-ROM | disk | FTP | other *** search
- I have a few questions about Amos Pro:
-
- 1) Is there an AGA extension yet?
- 2) Is there any way to read a two-button joystick from either port?
-
- And a general question about coding:
-
- What is a good procedure for detecting a "tap" of a fire button and a
- "press" (button held down)? Right now I have something like
-
- Procedure TESTHOLDBUTTON[STICK]
- '
- ' STICK is the port number
- '
- X = TRUE
- DELAY = 1200 : ' this is arbitrary
- While X = True
- X = Fire(STICK)
- Z = Z + 1
- If Z > DELAY Then X = False : ' Break out of loop if button held
- too long
- Wend
- If Z < DELAY
- R = False
- Else
- R = True
- End If
- End Proc[R]
- '
- ' R tells calling procedure whether button was tapped (False) or pressed
- ' (True).
- '
-
- This procedure works fine except that when I let go of the pressed button,
- the procedure registers a press AND a tap. I suspect that it's because
-
- a) procedure is called
- b) procedure is exited when "True" is returned, but button is still held
- c) procedure is called and exited again and again...
- d) eventually, Z < DELAY after n number of procedure calls
-
- Any way to fix this?
-
- ----------------------------------------------------------------------------
- | Carl Chavez Why is the audio tape "How to Get Your |
- | foregone@u.washington.edu Point Across in 30 Seconds or Less?" |
- | co-writer, NBA Jam FAQs (Simon & Schuster, #60247-0) a *60-minute* |
- | Dobar dan! Kako si? tape? |
- | BOB is coming. Beware of BOB. "Open the garage bay doors, BOB." -D.Bowman|
- ----------------------------------------------------------------------------
-
-
-
-